import Login.Service.BookService;
import Login.entity.Book;
import Login.util.ConnectMySql;
import org.junit.Test;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;

public class testMySQL {

    @Test
    public void connect() {
        ConnectMySql con = new ConnectMySql();
        Connection connection = con.openMySql();
    }

    @Test
    public void serviceTest() throws SQLException {
        BookService bookService = new BookService();
        ArrayList<Book> books = bookService.getBookList();
        for (Book book:books) {
            System.out.println(book);
        }
    }

}
